<template>
<div class="service">
	<el-tabs v-model="activeName" @tab-click="handleClick">
	  <el-tab-pane label="时长服务" name="first">
	  	<Duration ref="firstMethod"/>
	  </el-tab-pane>
	  <el-tab-pane label="月租服务" name="second">
	  	<Monthly ref="secondMethod"/>
	  </el-tab-pane>
	</el-tabs>
</div>
</template>

<script>
import Duration from './duration/index.vue'
import Monthly from './monthly/index.vue'

export default{
	components:{
		Duration,
		Monthly,
	},
	name:'service',
	data(){
		return{
			activeName: 'first',
		}
	},
	methods:{
		//点击每个个页签时重新加载数据展示列表
		handleClick(tab, event) {
			// if(tab.index == 0){
			// 	this.$refs.firstMethod.getTableData();
			// }
	  //       if(tab.index == 1){
	  //       	this.$refs.secondMethod.getTableData();
	  //       }
	  //       if(tab.index == 2){
			// 	this.$refs.thirdMethod.getTableData();
			// }
    },
	}
}
</script>

<style scoped>
.service {
	padding: 40px;
}
</style>
